const {app} = require('electron')
const {resolve, join} = require('path')
let publicConfig={}
if (app.isPackaged) {
    const configPath = join(process.env.DIST, 'dist/config.js') //获取public文件夹下的config.js参数,process.env.DIST在window.js中定义
    publicConfig=require(configPath)
} else {
    const configPath = join(process.cwd(), 'public/config.js')
    publicConfig=require(configPath)
}

module.exports={
    ...publicConfig  //把public文件夹下的config.js参数引入node
}
